package com.youxin.logprocess.common;

/**
 * Redis key名称
 * @author yingde.cao
 *
 */
public class MonitorRedisKeyGenerator {
	/**
	 * 保存所有主机失败信息
	 */
	public final static String INFO="info";
	
	/**
	 * 失败的主机
	 */
	public final static String HOST="host";
	/**
	 * 检测失败的次数
	 */
	public final static String HOSTS_TIMES="failtimes";
	/**
	 * 失败次数,不超过1kb
	 */
	public final static String EXCEPTION="exception";
	
	/**
	 * 一分钟内发送的信息
	 */
	public final static String MINUTE_SEND_MESSAGE="minuteMessage";
	public final static String HALFHOUR_SEND_MESSAGE="halfHourMessage";
	public final static String HOUR_SEND_MESSAGE="hourMessage";
	/**
	 * 锁监控的值
	 * @param key
	 * @return
	 */
	public static String lockKey(String key)
	{
		return key+":lock";
	}
	
	public static String minuteKey(String key)
	{
		return "one:"+key;
	}
	
	public static String twoKey(String key)
	{
		return "two:"+key;
	}
	
	public static String fiveKey(String key)
	{
		return "five:"+key;
	}
	
	public static String quarterKey(String key)
	{
		return "quarter:"+key;
	}
	
	public static String tenKey(String key)
	{
		return "ten:"+key;
	}
	
	public static String twentyKey(String key)
	{
		return "twenty:"+key;
	}
	
	public static String hourKey(String key)
	{
		return "hour:"+key;
	}
	
	
}
